﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Xml.Linq;
using TCS.Web;
using TCS.BLL;
using TCS.Model;

namespace TCS.Web.MembersHome
{
    public partial class CompanyModify: System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            TCS.Model.MemberInfo memberInfo = new TCS.Model.MemberInfo();
            memberInfo.Company = this.txtCompany.Text.ToString();
            memberInfo.MI_phone = this.txtPhone.Text.ToString();
            memberInfo.MI_Email = txtEmail.Text.ToString();
            memberInfo.MI_TrueName = this.txtMemberName.Text.ToString();
            bool result = new TCS.BLL.MemberInfo().Update(memberInfo);
            if (result == true)
            {
                this.ClientScript.RegisterStartupScript(this.GetType(), "alert", "<script>alert('资料更新成功！')</script>;localtion.href='CompanyModify.aspx'");
            }
            else 
            {
                this.ClientScript.RegisterStartupScript(this.GetType(), "alert", "<script>alert('资料更新失败！')</script>;localtion.href='CompanyModify.aspx'");
            }
        }

       
    }
}
